package com.jt.controller;

import com.jt.feign.RemoteProviderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/feign/")
public class FeignConsumerController {
    @Autowired
    private RemoteProviderService remoteProviderService;
    @GetMapping("echo/{msg}")
    public String doRestEcho(@PathVariable("msg") String msg) {

        return remoteProviderService.echoMsg(msg);

    }
}
